﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestBC25Module
{
    public class BC25Data
    {
        public string commandStr = "ATI";//发送的命令代码，用于解析应答时取出对应的数据内容
        public byte[] sendDataBuf = new byte[] { (byte)'A', (byte)'T', (byte)'I' };//需要通过串口发送的数据
        public byte[] recvDataBuf = null;//从串口中接收到的数据
        public int waitTime_ms = 300;//等待应答的时间，单位为ms
        public bool okFlag = false;//本条命令是否接收到了应答，=true则在规定的时间内收到了应答，=false则还没
        public DateTime overDateTime = DateTime.Now;

        public BC25Data(string commandStr, byte[] sendDataBuf, int waitTime_ms)
        {
            this.commandStr = commandStr;
            this.sendDataBuf = sendDataBuf;
            this.waitTime_ms = waitTime_ms;
        }

        public BC25Data(string commandStr, byte[] sendDataBuf)
        {
            this.commandStr = commandStr;
            this.sendDataBuf = sendDataBuf;
        }

        public BC25Data(bool okFlag)
        {
            this.okFlag = okFlag;
        }

        public BC25Data()
        {
        }
    }
}
